{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "236c13ac",
   "metadata": {},
   "outputs": [],
   "source": [
    "a = 'abcd%s' % 'efg'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "a46de33e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'abcdefg'"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "13c73e03",
   "metadata": {},
   "outputs": [],
   "source": [
    "b = 'abcd%d' % 122"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "1af88ca3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'abcd122'"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "7079e647",
   "metadata": {},
   "outputs": [],
   "source": [
    "c = 'abcde%d1' % 123"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "64c4ac1c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'abcde1231'"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "cb1cbbe5",
   "metadata": {},
   "outputs": [],
   "source": [
    "d = 'abcde%d4' % 123"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "89291ae2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'abcde1234'"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "4b9fe1a4",
   "metadata": {},
   "outputs": [],
   "source": [
    "f = 'abcde%d04' % 123"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "085465cb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'abcde12304'"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "f"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "5db6b10a",
   "metadata": {},
   "outputs": [],
   "source": [
    "g = 'abcde%4d' % 123"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "6a9ff1d2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'abcde 123'"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "g"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "id": "ddb535b5",
   "metadata": {},
   "outputs": [],
   "source": [
    "g1 = 'abcde%014d' % 123"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "9ca9d4f3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'abcde00000000000123'"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "g1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "b01f8ed3",
   "metadata": {},
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "must be real number, not str",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m~\\AppData\\Local\\Temp/ipykernel_14040/2269210981.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mh\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;34m'abc%fabc'\u001b[0m \u001b[1;33m%\u001b[0m \u001b[1;34m'as'\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m: must be real number, not str"
     ]
    }
   ],
   "source": [
    "h = 'abc%fabc' % 'as'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8e2dafaa",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
